/*tab下划线移动*/
function tabLine(Tparent,target,line,speed){
	if(Tparent.length==0||target.length==0||line.length==0){
		return;
	}
	line.css('marginLeft',$('.msui_tabMenu-active').offset().left);
	target.on('click',function() {
        var left = $(this).offset().left - Tparent.offset().left;
        if (line.is(":animated")) {   
            line.stop(true,true);   
        }
        line.animate({   
            marginLeft:left   
        }, speed);
    }) 
}
tabLine($(".coupons_ul"),$(".coupons_ul li"),$(".slide"),100);

$('.orderDetails .menu_list li').on('click',function(){
	var dataTab=$(this).attr('dataTab');
//	console.log($(this));
	var that=this;
	$('.orderDetails .menu_list li').each(function(){
		if($(this).hasClass('msui_tabMenu-active')){
			$(this).removeClass('msui_tabMenu-active');
		}
		$(that).addClass('msui_tabMenu-active');
	})
	$('.orderDetails .js-list').each(function(){
		$(this).css('display','none');
		if($(this).attr('dataPage')==$(that).attr('dataTab')){
			$(this).css('display','block');
		}
	})
})